﻿// ReferenceDataService.cs
//

using System;
using System.Linq;
using System.ServiceModel.DomainServices.EntityFramework;
using System.ServiceModel.DomainServices.Hosting;
using BookClub.Web.DataModel;

namespace BookClub.Web.Services {

    // This service provides access to reference data, that might be referenced by
    // entities from other domain services.
    [EnableClientAccess]
    public class ReferenceDataService : LinqToEntitiesDomainService<BookClubEntities> {

        public IQueryable<Category> GetCategories() {
            return ObjectContext.Categories.OrderBy(c => c.CategoryID);
        }
    }
}
